package cn.lingyangwl.agile.auth.model;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Set;

/**
 * 授权信息
 * @author shenguangyang
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class AuthorizationInfo {
    /**
     * 访问令牌
     */
    private String accessToken;

    /**
     * 客户端id
     */
    private String clientId;

    /**
     * 授予类型
     */
    private String grantType;

    /**
     * 颁发时间
     */
    private Long issuedAt;

    /**
     * 过期时间
     */
    private Long expiresAt;

    private Set<String> scopes;

//    public OAuth2Authorization toOAuth2Authorization() {
//        OAuth2Authorization.Builder authorizationBuilder = OAuth2Authorization.withRegisteredClient()
//                .authorizationGrantType(grantType)
//
//    }
}
